<?php
/**
 * Created on Aug 13, 2009
 * @filesource /modules/user/Form/ChangeAccountType.php
 * @abstract Generate a register form, where no lable is set
 *     see /modules/user/views/register/change-account-type.phtml for how the form is generated.
 */
class user_Form_ChangeAccountType extends Zend_Form
{

    protected $_noDecorator = array(
        'ViewHelper', 
        'Errors'
    );

    public function cluBuild($id)
    {
        $user = new user_Model_User(); //for DbUnique validators
        // set the method for the display form to POST
        $this->setMethod('POST');
//		$this->setAction('user/account/change-account-type?id='.$id);
		$this->setAction($this->getView()->hvnUrl(array('action' => 'change-account-type'),'account').'?id='.$id);

        // accType
        $accType = new Zend_Form_Element_Select('account_type',  array('disableLoadDefaultDecorators' => true,
                                                                 'required' => true));
        $accType->addMultiOption('none','--'.t(97).'--')
               ->addMultiOption('1',t(424))
               ->addMultiOption('2',t(425))
               ->addDecorators($this->_noDecorator);
        $this->addElement($accType);
        //submit
        // add the submit button
        $submit = new Zend_Form_Element_Submit('submit', array('disableLoadDefaultDecorators' => true, 
                                                               'label' => t(59) ));
        $submit->addDecorators($this->_noDecorator);
        $this->addElement($submit);

    }
}

?>

